package com.mzj.saas.commons.enums;

/**
 * 智能锁回调枚举
 * @author hp
 *
 */
public enum LockCallBackTypeEnum {
	
	
	/**
	 * 实时抄表回调
	 */
	READ_METER_DEGREE("readMeterDegreeCallBack","实时抄表回调"),
	
	/**
	 * 读取电表基本状态回调
	 */
	BASIC_AMMETER_STATUS("basicAmmeterStatusCallBack","读取电表基本状态回调"),
	
	/**
	 * 设置电表预存电量回调
	 */
	SET_ELEMTER_SET_CHARGE("setElemterSetChargeCallBack","设置电表预存电量回调"),
	
	/**
	 * 设置电表预存电量阈值回调
	 */
	ELEMTER_SET_CHARGE_ALARM("elemterSetChargeAlarmCallBack","设置电表预存电量阈值回调"),
	
	/**
	 * 添加普通或者次数密码回调
	 */
	ADD_PWD("addPwdCallBack","添加普通或者次数密码回调"),

	/**
	 * 冻结或解冻密码回调
	 */
	FREEZE_QR_UNFREEZE("freezeOrUnfreezeCallBack","冻结或解冻密码回调"),
	
	/**
	 * 冻结或解冻卡回调
	 */
	FREEZE_QR_UNFREEZE_CARD("freezeOrUnfreezeCardCallBack","冻结或解冻卡回调"),

	/**
	 * 删除普通或者次数密码回调
	 */
	CLEAR_PWD("clearPwdCallBack","删除普通或者次数密码回调"),

	/**
	 * 删除所有密码回调
	 */
	CLEAR_ALL_PWD("clearAllPwdCallBack","删除所有密码回调"),
	
	/**
	 * 添加卡回调
	 */
	ADD_CARD("addCardCallBack","添加卡回调"),
	
	/**
	 * 删除卡回调
	 */
	CLEAR_CARD("clearCardCallBack","删除卡回调"),
	
	/**
	 * 删除所有卡回调
	 */
	CLEAR_ALL_CARD("clearAllCardCallBack","删除所有卡回调"),
	
	/**
	 * 远程开门回调
	 */
	REMOTE_OPEN("remoteOpenCallBack","远程开门回调"),
	
	/**
	 * 其它
	 */
	OTHER("other","其它");
	
	
	private String callBackType;
	
	private String callBackText;

	LockCallBackTypeEnum(String callBackType,String callBackText) {
		this.callBackType = callBackType;
		this.callBackText = callBackText;
	}

	public String getCallBackType() {
		return callBackType;
	}
	

	public String getCallBackText() {
		return callBackText;
	}

	public static LockCallBackTypeEnum getLockType(String type) {
        for(LockCallBackTypeEnum s : values()) { 
            if(s.callBackType.equals(type)) {
            	return s;
            }
        }
        return LockCallBackTypeEnum.OTHER;
    }
	
	public static String getLockText(String type) {
        for(LockCallBackTypeEnum s : values()) { 
            if(s.callBackType.equals(type)) {
            	return s.callBackText;
            }
        }
        return OTHER.callBackText;
    }
	
}
